<template>
  <div class="child">
    <span @click="$router.go(-1)">&lt;</span>
    <van-search
  v-model="value"
  show-action
  label="公司"
  placeholder="请输入搜索关键词"
  @search="onSearch()"
>
  <template #action>
    <div @click="onSearch">搜索</div>  </template>
</van-search>
    <ul>
      <li v-for="(item,index) in newbool" :key="index">{{item.context}}</li>
    </ul>

  </div>
</template>

<script>


export default {
  data(){
    return{
value:''
    }
  },
computed:{
    newbool(){        
        return this.$store.state.caixia.comlist
           }
},
methods:{
  onSearch(){
this.$store.dispatch('COM_LIST',{comlist:this.value})
  }
  
}
}
</script>

<style lang="scss" scoped>
    ul{
     li{
       margin-top:.3rem
     }
    }
   
   </style>